<template>
  <div class="printForm">
    <div class="area-header">
      <span class="area-header-title">{{ $t('投后报告') }}</span>
    </div>
    <table class="printTable">
      <tr>
        <td class="tit">{{ $t('流程标题') }}</td>
        <td colspan="3">{{ form.actTitle }}</td>
      </tr>
      <tr>
        <td class="tit">{{ $t('报告名称') }}</td>
        <td>{{ form.reportName }}</td>
        <td class="tit">{{ $t('报告类型') }}</td>
        <td>
          <dictSelect
            v-model="form.reportType"
            :clearable="true"
            dictionary="deal_after_report_type"
          />
        </td>
      </tr>
      <tr>
        <td class="tit">{{ $t('重大事项说明') }}</td>
        <td colspan="3">{{ form.description }}</td>
      </tr>
      <tr>
        <td class="tit">{{ $t('重大风险分析') }}</td>
        <td colspan="3">{{ form.riskAnalysis }}</td>
      </tr>
      <tr>
        <td class="tit">{{ $t('其他说明') }}</td>
        <td colspan="3">{{ form.otherDescription }}</td>
      </tr>
    </table>

    <!-- 附件列表 -->
    <FileView :list.sync="form.fileList" data-type="deal_after_report" :btn-show="!otherBtnHide" />
  </div>
</template>

<script>
import { getDealAfterReport } from '@/api/deal/afterReport/dealAfterReport'
export default {
  data() {
    return {
      otherBtnHide: false,
      // 表单参数
      form: {
        fileList: []
      },
      // 操作按钮默认不展示
      buttonShow: true
    }
  },
  created() {
    this.$bus.$emit('async_done')
  },
  methods: {
    // 初始化数据
    init(data) {
      if (data != null && data.id !== undefined) {
        getDealAfterReport(data.id).then(response => {
          this.form = response.data
        })
      }
    }

  }

}
</script>
